//
//  DGSegmentedViewController.h
//  DGSegmentedViewController
//
//  Created by Jinxiao on 3/21/16.
//  Copyright © 2016 debugeek. All rights reserved.
//

@interface DGSegmentedViewController : UIViewController

@property (readonly) NSInteger selectedIndex;

@property (readonly) UIViewController *selectedViewController;

- (void)didSetupViewController:(UIViewController *)viewController atIndex:(NSInteger)index;
- (void)didSelectViewController:(UIViewController *)viewController atIndex:(NSInteger)index;

@property (readonly) NSArray <UIViewController *> *viewControllers;


- (NSArray <UIViewController *> *)preferredViewControllers;
- (NSArray <NSString *> *)preferredTitles;

- (UIButton *)preferredSegmentedButtonAtIndex:(NSInteger)index;

@property (readwrite, nonatomic, assign) BOOL hiddenSegmentsWhenSingle;

- (BOOL)prefersIndicatorHidden;

- (UIColor *)preferredIndicatorColor;
- (UIColor *)preferredIndicatorBackgroundColor;

- (CGFloat)preferredIndicatorWidth;
- (CGFloat)preferredIndicatorHeight;

- (void)transitIndicatorView:(UIView *)indicatorView fromIndex:(NSInteger)fromIndex toIndex:(NSInteger)toIndex;

- (void)reloadContents;

@end
